home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / c1.zip / FRAME.C < prev    next >
Text File  |  1987-06-18  |  2KB  |  53 lines

  1.  
  2. /**********************************************************
  3.  *   This function builds a nice looking frame for a      *
  4.  *   menu.  The function is passed the parameters for     *
  5.  *   the upper left corner row, upper left corner column  *
  6.  *   the height of the frame and the width.  Depending    *
  7.  *   on your particular compiler characteristics you      *
  8.  *   will have to substitute its functions for clear-     *
  9.  *   ing the screen and locating at the correct row       *
  10.  *   and column on the screen. the functions you will     *
  11.  *   need to replace with your own are scr_clr() and      *
  12.  *   scr_rowcol(x, y).                                    *
  13.  *                                                        *
  14.  *          Program By                                    *
  15.  *          Lynn Long                                     *
  16.  *          Tulsa, OK RBBS "C" Bulletin Board             *
  17.  *          918-664-8737                                  *
  18.  *********************************************************/
  19.  
  20. #define                 ULCOR                   201
  21. #define                 URCOR                   187
  22. #define                 LLCOR                   200
  23. #define                 LRCOR                   188
  24. #define                 VBAR                    186
  25. #define                 HBAR                    205
  26.  
  27. frame(row, col, hgt, wdth)
  28. int row, col, hgt, wdth;
  29.  
  30. {
  31.         int x, y;
  32.  
  33.  
  34.         scr_clr();                                /*  insert your code here to clear screen  */
  35.         scr_rowcol(row, col);                     /*  insert your function to locate row and col */
  36.         putchar(ULCOR);
  37.     for(x = col + 1; x <=(col + wdth -1); x++)
  38.         putchar(HBAR);
  39.         putchar(URCOR);
  40.         for(x = row + 1; x <=(row + hgt - 1); x++){
  41.         scr_rowcol(x, col);
  42.         putchar(VBAR);
  43.         scr_rowcol(x, col+wdth);
  44.         putchar(VBAR);
  45.    }
  46.     scr_rowcol(x, col);
  47.     putchar(LLCOR);
  48.     for(x= col + 1; x <=(col + wdth -1); x++)
  49.         putchar(HBAR);
  50.         putchar(LRCOR);
  51. }
  52.  
  53.